package com.situ.day24;

import java.io.Serializable;
import java.lang.String;

public class Student implements Serializable {
    private Integer id; // null   int id
    private String na;// student.name  getName()

    // <init>
    public Student() {
        // invokespecial #1 <java/lang/Object.<init> : ()V>
        // new Object()
        // super();
        // new Student(2, "王五");
        // Call to 'this()' must be first statement in constructor body
        this(2, "王五");
    }

    public Student(Integer id, String na) {

        this.id = id;
        this.na = na;
    }

    public Integer getId() {
        return id;
    }

    // 实例方法
    public void setId(Integer id) {
        this.id = id;
    }

    // 静态方法
    public static void show() {

    }

    public void setName(String name) {
        this.na = name;
    }

    public String getName() {
        return na;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", na='" + na + '\'' +
                '}';
    }
}
